Inheritance At abstract class level:

abstract class: It is a template/blue print which provides reference/base to the sub classes.
 Sub class can take the templates from the abstract class & implement in its required manner.


Q: When to go for abstract class?
Ans:
When all the child classes has to implement the same behaviours from the single parent class
Ex: Banks and RBI
Telecom service provide and TRAI


Rules for abstract class:

1. abstract class can contains instance members, static members & abstract methods.

abstract method: writing a method with name and signature but without having body is k.a, abstract method
Ex: 
abstract void display1(String strName);
abstract void display2();

Note: Abstract methods are partially developed methods.

2. abstract class may OR may not have abstract method.

3. If class contains any one abstract member, then the whole class will become abstract class.

4. We cannot create a object to the abstract class. Bcoz the abstract class is having partial implementation.

5. We cannot create a object to abstract class. But we can give abstract class variable as a reference to child class object. If we follow the above approach then we can access only abstract class members but cannot access Child class members except overriding.

6. Any child class which extends abstract Parent class must provide body/implementations to ALL the abstract methods available in the abstract class. If not, the child class will become abstract class

7. In abstrct class the abstract keyword is mandatory while defining abstract methods.

8. If we create a object to Child class directly then we can access both Parent class members (except private and static) & as well as Child class members.

9. If both parent (abstract class) & child class are having method overriding & we are creating a object to abstract class by giving abstract class variable as a reference to child class object. Under this situation the new implementation will always gets executed (Child method will get execute)

10. To establish parent (abstract class) and child class relation we use extends keyword.
